/*
 * @Author: your name
 * @Date: 2021-06-29 09:19:41
 * @LastEditTime: 2021-07-01 11:17:33
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue-hr-project\src\utils\validate.js
 */
/**
 * Created by PanJiaChen on 16/11/18.
 */

/**
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path) {
  return /^(https?:|mailto:|tel:)/.test(path)
}

/**
 * @description: 手机号校验
 * @param {*} mobile
 * @return {Boolean}
 */
export function valiMobile(mobile) {
  // 具体的校验规则
  // 最终把校验是否通过的 布尔值return 出去
  return /^1[3-9]\d{9}$/.test(mobile) // 校验手机号
}
